home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
progjour
/
1991
/
01
/
hotkey.prg
< prev
next >
Wrap
Text File
|
1990-11-25
|
2KB
|
50 lines
*** HOTKEY.PRG && partial code fragment
*** a revised version of menukey that supports a HOT-Key to save
*** the current EPA RRN and name to a database called ortemp.dbf
*** with an alias of TMP
private m_seekok
m_seekok = .F.
** Add the following option to MENUKEY's main case statement
** to support a hot-key option
CASE choice = 22 && insert or CTRL-V
m_row = ROW()
m_col = COL()
m_dbf = dbf() && save current database
m_select = select() && save current work area
m_select = chr(m_select+64) && convert to ascii
save screen to m_screen
m_temprrn = EPA->>rrn
m_tempname = EPA->>name
IF .not. m_editflg
?? CHR(7)
ENDIF
select TMP
IF m_editflg .and. m_editidx && is file indexed by RRN
seek m_temprrn
if EOF()
m_seekok = .F.
skip -1
else
m_seekok = .T.
endif
ENDIF
IF .not. m_seekok .or. .not. m_editidx
append blank
replace TMP->>rrn with m_temprrn
replace TMP->>name with m_tempname
replace TMP->>rev_date with date()
ENDIF
IF (m_editflg)
edit
ENDIF
SELECT &m_select.
restore screen from m_screen
@ m_row, m_col SAY "" && restore cursor
badkey = .T.
notfound = .T.